#[cfg(test)]
mod font_fix_tests {
    use cdb_gui::fonts::Fonts;
    use iced::Font;

    #[test]
    fn test_chinese_font_configuration() {
        // Test that Chinese font is properly configured
        let chinese_font = Fonts::get_chinese_font();
        
        // Verify it's using Microsoft YaHei (the default Chinese font on Windows)
        match chinese_font.family {
            iced::font::Family::Name(name) => {
                assert_eq!(name, "Microsoft YaHei");
            }
            _ => panic!("Expected named font family"),
        }
    }

    #[test]
    fn test_monospace_font_configuration() {
        // Test that monospace font is properly configured
        let mono_font = Fonts::get_monospace_font();
        
        // Verify it's using Consolas (the default monospace font on Windows)
        match mono_font.family {
            iced::font::Family::Name(name) => {
                assert_eq!(name, "Consolas");
            }
            _ => panic!("Expected named font family"),
        }
    }

    #[test]
    fn test_fallback_fonts_list() {
        // Test that fallback font lists are properly defined
        assert!(!Fonts::FALLBACK_CHINESE.is_empty());
        assert!(!Fonts::FALLBACK_MONOSPACE.is_empty());
        
        // Verify primary fonts are in the fallback lists
        assert!(Fonts::FALLBACK_CHINESE.contains(&"Microsoft YaHei"));
        assert!(Fonts::FALLBACK_MONOSPACE.contains(&"Consolas"));
        
        // Verify fallback fonts include system defaults
        assert!(Fonts::FALLBACK_CHINESE.contains(&"sans-serif"));
        assert!(Fonts::FALLBACK_MONOSPACE.contains(&"monospace"));
    }

    #[test]
    fn test_font_constants() {
        // Test that font constants are properly defined
        assert_eq!(Fonts::DEFAULT.family, iced::font::Family::Name("Microsoft YaHei"));
        assert_eq!(Fonts::MONOSPACE.family, iced::font::Family::Name("Consolas"));
    }

    #[test]
    fn test_font_sizes() {
        // Test that font size constants are reasonable
        use cdb_gui::fonts::sizes;
        
        assert_eq!(sizes::XS, 10);
        assert_eq!(sizes::SM, 12);
        assert_eq!(sizes::MD, 14);
        assert_eq!(sizes::LG, 16);
        assert_eq!(sizes::XL, 18);
        assert_eq!(sizes::XL2, 20);
        assert_eq!(sizes::XL3, 24);
        
        // Verify sizes are in ascending order
        assert!(sizes::XS < sizes::SM);
        assert!(sizes::SM < sizes::MD);
        assert!(sizes::MD < sizes::LG);
        assert!(sizes::LG < sizes::XL);
        assert!(sizes::XL < sizes::XL2);
        assert!(sizes::XL2 < sizes::XL3);
    }

    #[test]
    fn test_font_weights() {
        // Test that font weight constants are standard values
        use cdb_gui::fonts::weights;
        
        assert_eq!(weights::NORMAL, 400);
        assert_eq!(weights::MEDIUM, 500);
        assert_eq!(weights::SEMIBOLD, 600);
        assert_eq!(weights::BOLD, 700);
        
        // Verify weights are in ascending order
        assert!(weights::NORMAL < weights::MEDIUM);
        assert!(weights::MEDIUM < weights::SEMIBOLD);
        assert!(weights::SEMIBOLD < weights::BOLD);
    }
}
